#include "Bullet3Dynamics/ConstraintSolver/b3Generic6DofConstraint.h"
#ifdef __cplusplus
extern "C" {
#endif
b3TranslationalLimitMotor* bullet_Newb3TranslationalLimitMotor(){
	b3TranslationalLimitMotor* wrap_out = new b3TranslationalLimitMotor();
	return wrap_out;
}

b3TranslationalLimitMotor* bullet_Newb3TranslationalLimitMotor1(b3TranslationalLimitMotor* other){
	b3TranslationalLimitMotor const& c_arg_other=(b3TranslationalLimitMotor const&)(*other);
	b3TranslationalLimitMotor* wrap_out = new b3TranslationalLimitMotor(c_arg_other);
	return wrap_out;
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_accumulatedImpulse(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_accumulatedImpulse);
}

int** bullet_b3TranslationalLimitMotor_GetFieldOfM_currentLimit(b3TranslationalLimitMotor* c_this){
	return (int**)(&c_this->m_currentLimit);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_currentLimitError(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_currentLimitError);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_currentLinearDiff(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_currentLinearDiff);
}

float bullet_b3TranslationalLimitMotor_GetFieldOfM_damping(b3TranslationalLimitMotor* c_this){
	return (float)(c_this->m_damping);
}

bool** bullet_b3TranslationalLimitMotor_GetFieldOfM_enableMotor(b3TranslationalLimitMotor* c_this){
	return (bool**)(&c_this->m_enableMotor);
}

float bullet_b3TranslationalLimitMotor_GetFieldOfM_limitSoftness(b3TranslationalLimitMotor* c_this){
	return (float)(c_this->m_limitSoftness);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_lowerLimit(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_lowerLimit);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_maxMotorForce(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_maxMotorForce);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_normalCFM(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_normalCFM);
}

float bullet_b3TranslationalLimitMotor_GetFieldOfM_restitution(b3TranslationalLimitMotor* c_this){
	return (float)(c_this->m_restitution);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_stopCFM(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_stopCFM);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_stopERP(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_stopERP);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_targetVelocity(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_targetVelocity);
}

b3Vector3* bullet_b3TranslationalLimitMotor_GetFieldOfM_upperLimit(b3TranslationalLimitMotor* c_this){
	return (b3Vector3*)(&c_this->m_upperLimit);
}

bool bullet_b3TranslationalLimitMotor_isLimited(b3TranslationalLimitMotor* c_this,int limitIndex){
	int c_arg_limitIndex=limitIndex;
	bool c_out = c_this->isLimited(c_arg_limitIndex);
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_b3TranslationalLimitMotor_needApplyForce(b3TranslationalLimitMotor* c_this,int limitIndex){
	int c_arg_limitIndex=limitIndex;
	bool c_out = c_this->needApplyForce(c_arg_limitIndex);
	bool wrap_out = (c_out);
	return wrap_out;
}

int bullet_b3TranslationalLimitMotor_testLimitValue(b3TranslationalLimitMotor* c_this,int limitIndex,float test_value){
	int c_arg_limitIndex=limitIndex;
	b3Scalar c_arg_test_value=test_value;
	int c_out = c_this->testLimitValue(c_arg_limitIndex,c_arg_test_value);
	int wrap_out = (c_out);
	return wrap_out;
}

b3RotationalLimitMotor* bullet_Newb3RotationalLimitMotor(){
	b3RotationalLimitMotor* wrap_out = new b3RotationalLimitMotor();
	return wrap_out;
}

b3RotationalLimitMotor* bullet_Newb3RotationalLimitMotor1(b3RotationalLimitMotor* limot){
	b3RotationalLimitMotor const& c_arg_limot=(b3RotationalLimitMotor const&)(*limot);
	b3RotationalLimitMotor* wrap_out = new b3RotationalLimitMotor(c_arg_limot);
	return wrap_out;
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_accumulatedImpulse(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_accumulatedImpulse);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_bounce(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_bounce);
}

int bullet_b3RotationalLimitMotor_GetFieldOfM_currentLimit(b3RotationalLimitMotor* c_this){
	return (int)(c_this->m_currentLimit);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_currentLimitError(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_currentLimitError);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_currentPosition(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_currentPosition);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_damping(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_damping);
}

bool bullet_b3RotationalLimitMotor_GetFieldOfM_enableMotor(b3RotationalLimitMotor* c_this){
	return (bool)(c_this->m_enableMotor);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_hiLimit(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_hiLimit);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_limitSoftness(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_limitSoftness);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_loLimit(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_loLimit);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_maxLimitForce(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_maxLimitForce);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_maxMotorForce(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_maxMotorForce);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_normalCFM(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_normalCFM);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_stopCFM(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_stopCFM);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_stopERP(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_stopERP);
}

float bullet_b3RotationalLimitMotor_GetFieldOfM_targetVelocity(b3RotationalLimitMotor* c_this){
	return (float)(c_this->m_targetVelocity);
}

bool bullet_b3RotationalLimitMotor_isLimited(b3RotationalLimitMotor* c_this){
	bool c_out = c_this->isLimited();
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_b3RotationalLimitMotor_needApplyTorques(b3RotationalLimitMotor* c_this){
	bool c_out = c_this->needApplyTorques();
	bool wrap_out = (c_out);
	return wrap_out;
}

int bullet_b3RotationalLimitMotor_testLimitValue(b3RotationalLimitMotor* c_this,float test_value){
	b3Scalar c_arg_test_value=test_value;
	int c_out = c_this->testLimitValue(c_arg_test_value);
	int wrap_out = (c_out);
	return wrap_out;
}

b3Generic6DofConstraint* bullet_Newb3Generic6DofConstraint(int rbA,int rbB,b3Transform* frameInA,b3Transform* frameInB,bool useLinearReferenceFrameA,b3RigidBodyData* bodies){
	int c_arg_rbA=rbA;
	int c_arg_rbB=rbB;
	b3Transform const& c_arg_frameInA=(b3Transform const&)(*frameInA);
	b3Transform const& c_arg_frameInB=(b3Transform const&)(*frameInB);
	bool c_arg_useLinearReferenceFrameA=useLinearReferenceFrameA;
	b3RigidBodyData const * c_arg_bodies=(b3RigidBodyData const *)(void*)(bodies);
	b3Generic6DofConstraint* wrap_out = new b3Generic6DofConstraint(c_arg_rbA,c_arg_rbB,c_arg_frameInA,c_arg_frameInB,c_arg_useLinearReferenceFrameA,c_arg_bodies);
	return wrap_out;
}

void bullet_b3Generic6DofConstraint_calculateTransforms(b3Generic6DofConstraint* c_this,b3Transform* transA,b3Transform* transB,b3RigidBodyData* bodies){
	b3Transform const& c_arg_transA=(b3Transform const&)(*transA);
	b3Transform const& c_arg_transB=(b3Transform const&)(*transB);
	b3RigidBodyData const * c_arg_bodies=(b3RigidBodyData const *)(void*)(bodies);
	c_this->calculateTransforms(c_arg_transA,c_arg_transB,c_arg_bodies);
}

void bullet_b3Generic6DofConstraint_calculateTransforms1(b3Generic6DofConstraint* c_this,b3RigidBodyData* bodies){
	b3RigidBodyData const * c_arg_bodies=(b3RigidBodyData const *)(void*)(bodies);
	c_this->calculateTransforms(c_arg_bodies);
}

int bullet_b3Generic6DofConstraint_get_limit_motor_info2(b3Generic6DofConstraint* c_this,b3RotationalLimitMotor* limot,b3Transform* transA,b3Transform* transB,b3Vector3* linVelA,b3Vector3* linVelB,b3Vector3* angVelA,b3Vector3* angVelB,b3TypedConstraint::b3ConstraintInfo2* info,int row,b3Vector3* ax1,int rotational,int rotAllowed){
	b3RotationalLimitMotor * c_arg_limot=(b3RotationalLimitMotor *)(void*)(limot);
	b3Transform const& c_arg_transA=(b3Transform const&)(*transA);
	b3Transform const& c_arg_transB=(b3Transform const&)(*transB);
	b3Vector3 const& c_arg_linVelA=(b3Vector3 const&)(*linVelA);
	b3Vector3 const& c_arg_linVelB=(b3Vector3 const&)(*linVelB);
	b3Vector3 const& c_arg_angVelA=(b3Vector3 const&)(*angVelA);
	b3Vector3 const& c_arg_angVelB=(b3Vector3 const&)(*angVelB);
	b3TypedConstraint::b3ConstraintInfo2 * c_arg_info=(b3TypedConstraint::b3ConstraintInfo2 *)(void*)(info);
	int c_arg_row=row;
	b3Vector3& c_arg_ax1=(b3Vector3&)(*ax1);
	int c_arg_rotational=rotational;
	int c_arg_rotAllowed=rotAllowed;
	int c_out = c_this->get_limit_motor_info2(c_arg_limot,c_arg_transA,c_arg_transB,c_arg_linVelA,c_arg_linVelB,c_arg_angVelA,c_arg_angVelB,c_arg_info,c_arg_row,c_arg_ax1,c_arg_rotational,c_arg_rotAllowed);
	int wrap_out = (c_out);
	return wrap_out;
}

float bullet_b3Generic6DofConstraint_getAngle(b3Generic6DofConstraint* c_this,int axis_index){
	int c_arg_axis_index=axis_index;
	b3Scalar c_out = c_this->getAngle(c_arg_axis_index);
	float wrap_out = (c_out);
	return wrap_out;
}

void bullet_b3Generic6DofConstraint_getAngularLowerLimit(b3Generic6DofConstraint* c_this,b3Vector3* angularLower){
	b3Vector3& c_arg_angularLower=(b3Vector3&)(*angularLower);
	c_this->getAngularLowerLimit(c_arg_angularLower);
}

void bullet_b3Generic6DofConstraint_getAngularUpperLimit(b3Generic6DofConstraint* c_this,b3Vector3* angularUpper){
	b3Vector3& c_arg_angularUpper=(b3Vector3&)(*angularUpper);
	c_this->getAngularUpperLimit(c_arg_angularUpper);
}

b3Vector3* bullet_b3Generic6DofConstraint_getAxis(b3Generic6DofConstraint* c_this,int axis_index){
	int c_arg_axis_index=axis_index;
	b3Vector3 c_out = c_this->getAxis(c_arg_axis_index);
	b3Vector3* wrap_out = new b3Vector3(c_out);
	return wrap_out;
}

b3Transform* bullet_b3Generic6DofConstraint_getCalculatedTransformA(b3Generic6DofConstraint* c_this){
	b3Transform const& c_out = c_this->getCalculatedTransformA();
	b3Transform* wrap_out = (b3Transform*)(&c_out);
	return wrap_out;
}

b3Transform* bullet_b3Generic6DofConstraint_getCalculatedTransformB(b3Generic6DofConstraint* c_this){
	b3Transform const& c_out = c_this->getCalculatedTransformB();
	b3Transform* wrap_out = (b3Transform*)(&c_out);
	return wrap_out;
}

b3Transform* bullet_b3Generic6DofConstraint_getFrameOffsetA(b3Generic6DofConstraint* c_this){
	b3Transform const& c_out = c_this->getFrameOffsetA();
	b3Transform* wrap_out = (b3Transform*)(&c_out);
	return wrap_out;
}

b3Transform* bullet_b3Generic6DofConstraint_getFrameOffsetA1(b3Generic6DofConstraint* c_this){
	b3Transform& c_out = c_this->getFrameOffsetA();
	b3Transform* wrap_out = (b3Transform*)(&c_out);
	return wrap_out;
}

b3Transform* bullet_b3Generic6DofConstraint_getFrameOffsetB(b3Generic6DofConstraint* c_this){
	b3Transform const& c_out = c_this->getFrameOffsetB();
	b3Transform* wrap_out = (b3Transform*)(&c_out);
	return wrap_out;
}

b3Transform* bullet_b3Generic6DofConstraint_getFrameOffsetB1(b3Generic6DofConstraint* c_this){
	b3Transform& c_out = c_this->getFrameOffsetB();
	b3Transform* wrap_out = (b3Transform*)(&c_out);
	return wrap_out;
}

void bullet_b3Generic6DofConstraint_getInfo1NonVirtual(b3Generic6DofConstraint* c_this,b3TypedConstraint::b3ConstraintInfo1* info,b3RigidBodyData* bodies){
	b3TypedConstraint::b3ConstraintInfo1 * c_arg_info=(b3TypedConstraint::b3ConstraintInfo1 *)(void*)(info);
	b3RigidBodyData const * c_arg_bodies=(b3RigidBodyData const *)(void*)(bodies);
	c_this->getInfo1NonVirtual(c_arg_info,c_arg_bodies);
}

void bullet_b3Generic6DofConstraint_getInfo2NonVirtual(b3Generic6DofConstraint* c_this,b3TypedConstraint::b3ConstraintInfo2* info,b3Transform* transA,b3Transform* transB,b3Vector3* linVelA,b3Vector3* linVelB,b3Vector3* angVelA,b3Vector3* angVelB,b3RigidBodyData* bodies){
	b3TypedConstraint::b3ConstraintInfo2 * c_arg_info=(b3TypedConstraint::b3ConstraintInfo2 *)(void*)(info);
	b3Transform const& c_arg_transA=(b3Transform const&)(*transA);
	b3Transform const& c_arg_transB=(b3Transform const&)(*transB);
	b3Vector3 const& c_arg_linVelA=(b3Vector3 const&)(*linVelA);
	b3Vector3 const& c_arg_linVelB=(b3Vector3 const&)(*linVelB);
	b3Vector3 const& c_arg_angVelA=(b3Vector3 const&)(*angVelA);
	b3Vector3 const& c_arg_angVelB=(b3Vector3 const&)(*angVelB);
	b3RigidBodyData const * c_arg_bodies=(b3RigidBodyData const *)(void*)(bodies);
	c_this->getInfo2NonVirtual(c_arg_info,c_arg_transA,c_arg_transB,c_arg_linVelA,c_arg_linVelB,c_arg_angVelA,c_arg_angVelB,c_arg_bodies);
}

void bullet_b3Generic6DofConstraint_getLinearLowerLimit(b3Generic6DofConstraint* c_this,b3Vector3* linearLower){
	b3Vector3& c_arg_linearLower=(b3Vector3&)(*linearLower);
	c_this->getLinearLowerLimit(c_arg_linearLower);
}

void bullet_b3Generic6DofConstraint_getLinearUpperLimit(b3Generic6DofConstraint* c_this,b3Vector3* linearUpper){
	b3Vector3& c_arg_linearUpper=(b3Vector3&)(*linearUpper);
	c_this->getLinearUpperLimit(c_arg_linearUpper);
}

float bullet_b3Generic6DofConstraint_getRelativePivotPosition(b3Generic6DofConstraint* c_this,int axis_index){
	int c_arg_axis_index=axis_index;
	b3Scalar c_out = c_this->getRelativePivotPosition(c_arg_axis_index);
	float wrap_out = (c_out);
	return wrap_out;
}

b3RotationalLimitMotor* bullet_b3Generic6DofConstraint_getRotationalLimitMotor(b3Generic6DofConstraint* c_this,int index){
	int c_arg_index=index;
	b3RotationalLimitMotor * c_out = c_this->getRotationalLimitMotor(c_arg_index);
	b3RotationalLimitMotor* wrap_out = (b3RotationalLimitMotor*)(void*)(c_out);
	return wrap_out;
}

b3TranslationalLimitMotor* bullet_b3Generic6DofConstraint_getTranslationalLimitMotor(b3Generic6DofConstraint* c_this){
	b3TranslationalLimitMotor * c_out = c_this->getTranslationalLimitMotor();
	b3TranslationalLimitMotor* wrap_out = (b3TranslationalLimitMotor*)(void*)(c_out);
	return wrap_out;
}

bool bullet_b3Generic6DofConstraint_getUseFrameOffset(b3Generic6DofConstraint* c_this){
	bool c_out = c_this->getUseFrameOffset();
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_b3Generic6DofConstraint_isLimited(b3Generic6DofConstraint* c_this,int limitIndex){
	int c_arg_limitIndex=limitIndex;
	bool c_out = c_this->isLimited(c_arg_limitIndex);
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_b3Generic6DofConstraint_setAngularLowerLimit(b3Generic6DofConstraint* c_this,b3Vector3* angularLower){
	b3Vector3 const& c_arg_angularLower=(b3Vector3 const&)(*angularLower);
	c_this->setAngularLowerLimit(c_arg_angularLower);
}

void bullet_b3Generic6DofConstraint_setAngularUpperLimit(b3Generic6DofConstraint* c_this,b3Vector3* angularUpper){
	b3Vector3 const& c_arg_angularUpper=(b3Vector3 const&)(*angularUpper);
	c_this->setAngularUpperLimit(c_arg_angularUpper);
}

void bullet_b3Generic6DofConstraint_setAxis(b3Generic6DofConstraint* c_this,b3Vector3* axis1,b3Vector3* axis2,b3RigidBodyData* bodies){
	b3Vector3 const& c_arg_axis1=(b3Vector3 const&)(*axis1);
	b3Vector3 const& c_arg_axis2=(b3Vector3 const&)(*axis2);
	b3RigidBodyData const * c_arg_bodies=(b3RigidBodyData const *)(void*)(bodies);
	c_this->setAxis(c_arg_axis1,c_arg_axis2,c_arg_bodies);
}

void bullet_b3Generic6DofConstraint_setFrames(b3Generic6DofConstraint* c_this,b3Transform* frameA,b3Transform* frameB,b3RigidBodyData* bodies){
	b3Transform const& c_arg_frameA=(b3Transform const&)(*frameA);
	b3Transform const& c_arg_frameB=(b3Transform const&)(*frameB);
	b3RigidBodyData const * c_arg_bodies=(b3RigidBodyData const *)(void*)(bodies);
	c_this->setFrames(c_arg_frameA,c_arg_frameB,c_arg_bodies);
}

void bullet_b3Generic6DofConstraint_setLimit(b3Generic6DofConstraint* c_this,int axis,float lo,float hi){
	int c_arg_axis=axis;
	b3Scalar c_arg_lo=lo;
	b3Scalar c_arg_hi=hi;
	c_this->setLimit(c_arg_axis,c_arg_lo,c_arg_hi);
}

void bullet_b3Generic6DofConstraint_setLinearLowerLimit(b3Generic6DofConstraint* c_this,b3Vector3* linearLower){
	b3Vector3 const& c_arg_linearLower=(b3Vector3 const&)(*linearLower);
	c_this->setLinearLowerLimit(c_arg_linearLower);
}

void bullet_b3Generic6DofConstraint_setLinearUpperLimit(b3Generic6DofConstraint* c_this,b3Vector3* linearUpper){
	b3Vector3 const& c_arg_linearUpper=(b3Vector3 const&)(*linearUpper);
	c_this->setLinearUpperLimit(c_arg_linearUpper);
}

void bullet_b3Generic6DofConstraint_setUseFrameOffset(b3Generic6DofConstraint* c_this,bool frameOffsetOnOff){
	bool c_arg_frameOffsetOnOff=frameOffsetOnOff;
	c_this->setUseFrameOffset(c_arg_frameOffsetOnOff);
}

bool bullet_b3Generic6DofConstraint_testAngularLimitMotor(b3Generic6DofConstraint* c_this,int axis_index){
	int c_arg_axis_index=axis_index;
	bool c_out = c_this->testAngularLimitMotor(c_arg_axis_index);
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_b3Generic6DofConstraint_updateRHS(b3Generic6DofConstraint* c_this,float timeStep){
	b3Scalar c_arg_timeStep=timeStep;
	c_this->updateRHS(c_arg_timeStep);
}

#ifdef __cplusplus
}
#endif
